/*!
    \copyright  Copyright (c) 2024 Qualcomm Technologies International, Ltd.
                All Rights Reserved.
                Qualcomm Technologies International, Ltd. Confidential and Proprietary.
    \version    
    \file       dult.h
    \addtogroup dult
    \brief      Component handling DULT (Detecting Unwanted Location Trackers)
*/

#ifndef DULT_H_
#define DULT_H_

#include "bdaddr_.h"
#include "le_advertising_manager_multi_set.h"

/*! \brief DULT component initialization.
 */
void Dult_Init(void);

/*! \brief Sets the "Proprietary Company Payload" in the location-enabled advertisement payload.
           Should be used regardless of whether the component uses its own advertising set.
    \param payload Pointer to payload data.
    \param payload_size Payload size.
    \return None
 */
void Dult_SetCompanyPayload(const uint8_t *const payload, const size_t payload_size);

/*! \brief Provides the DULT advertisement data, including the Proprietary Company Payload.
           Only needs to be used when the advertisement data need to be included in the caller's advertisement set.
    \param void
    \return le_adv_item_data_t The advertisement data.
 */
le_adv_item_data_t Dult_GetAdvItemData(void);

/*! \brief Sets address to be used for the advertisement set.
           Only needs to be used when the DULT component manages its own advertisement set,
           not when the advertisement data need to be included in the caller's advertisement set.
    \param addr The device address.
    \return None
 */
void Dult_SetAdvAddress(bdaddr addr);

/*! \brief Indicates to the DULT component that the device is in close proximity to its owner.
    \param void
    \return None
 */
void Dult_IndicateNearOwner(void);

/*! \brief Indicates to the DULT component that the device was separated from its owner.
           Normally triggers a 30 minute timeout to go into separate mode.
    \param eagerly Whether to transition to separate mode immediately or start a timer.
    \return None
 */
void Dult_IndicateSeparated(bool eagerly);

void Dult_Enable(void);

void Dult_Disable(void);

bool Dult_IsEnabled(void);

#endif
